package cn.kc.jdbc.controller;

import cn.kc.jdbc.entity.Student;
import cn.kc.jdbc.service.StudentService;
import cn.kc.jdbc.service.StudentServiceImpl;

import java.util.List;

/**
 * @author mosin
 * date 2022/2/14
 * @version 1.0
 * 学生业务控制层
 */
public class StudentController {
    private StudentService studentService  = new StudentServiceImpl();
    //添加学生
    public  Boolean addStudent(Student student){
        return  studentService.addStudent(student);
    };

    //删除学生

    public  Boolean delStudent(Integer id){
        return studentService.delStudent(id);
    };

    //给学生分班

    public  Boolean updateStudent(Integer stuId,String className){
        return studentService.updateStudent(stuId,className);
    };


    //查询所有学生信息
    public List<Student> findAll(){
       return  studentService.fidAll();
    }


}
